import string, sys

def main():
    sTrans = string.maketrans('10ABCDEFGHIJKLMNOPQRSTUVWXYZ', '1022233344455566677778889999')
    data = sys.stdin.readlines()
    output_user = [] 
    for line in data:
        output_user.append(line.translate(sTrans))
    print '\n'.join(output_user)
    
main()